package com.appwoo.android.util;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;

public class HttpHelper
{
  public static String getResponseToString(String paramString)
    throws IOException
  {
    BufferedReader localBufferedReader = new BufferedReader(new InputStreamReader(((HttpURLConnection)new URL(paramString).openConnection()).getInputStream(), "UTF-8"));
    StringBuilder localStringBuilder = new StringBuilder();
    while (true)
    {
      String str = localBufferedReader.readLine();
      if (str == null)
        return localStringBuilder.toString();
      localStringBuilder.append(str);
    }
  }

  public static String getResponseToString(String paramString1, String paramString2)
    throws IOException
  {
    if (paramString2 == null)
      paramString2 = "UTF-8";
    BufferedReader localBufferedReader = new BufferedReader(new InputStreamReader(((HttpURLConnection)new URL(paramString1).openConnection()).getInputStream(), paramString2));
    StringBuilder localStringBuilder = new StringBuilder();
    while (true)
    {
      String str = localBufferedReader.readLine();
      if (str == null)
        return localStringBuilder.toString();
      localStringBuilder.append(str);
    }
  }
}

/* Location:           C:\Documents and Settings\Administrator\classes_dex2jar.jar
 * Qualified Name:     com.appwoo.android.util.HttpHelper
 * JD-Core Version:    0.6.2
 */